home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
018a
/
pdxwp122.zip
/
PDX2WP.DOC
< prev
next >
Wrap
Text File
|
1991-12-05
|
41KB
|
1,052 lines
PDX2WP
A Paradox to WordPefect Translation Utility
Shareware Version 1.22
Copyright (c) 1990, 1991 S.L.S. Systems
All Rights Reserved.
TABLE OF CONTENTS
License and Warranty Information . . . . . . . . . . . . . . 1
What Is PDX2WP? . . . . . . . . . . . . . . . . . . . . . . . 2
Installing PDX2WP . . . . . . . . . . . . . . . . . . . . . . 3
How to Use the PDX2WP Utility . . . . . . . . . . . . . . . . 4
Running the PDX2WP Utility From the DOS Command Line . . 4
Running the PDX2WP Utility From a Paradox PAL Script . . 5
Running the PDX2WP Utility From Interactive Paradox . . . 7
Using PDX2WP with Sidekick 2.0 . . . . . . . . . . . . . 8
How to Use the WP2PDX Utility . . . . . . . . . . . . . . . . 9
Running the WP2PDX Utility From the DOS Command Line . . 9
Limitations of PDX2WP . . . . . . . . . . . . . . . . . . . . 11
Suggestions and Hints . . . . . . . . . . . . . . . . . . . . 12
Final Comments . . . . . . . . . . . . . . . . . . . . . . . 13
Invoice/Registration Form . . . . . . . . . . . . . . . . . . 15
PDX2WP Page i
License and Warranty Information
PDX2WP is not in the public domain. This is the limited shareware
version of the full commercial product. It is fully protected by
copyright law.
You are granted without charge a license which permits (a) use of
the program for a reasonable period for evaluation and testing;
(b) making copies for distribution to others without charge,
provided the program and the accompanying documentation and
other files are distributed together and without modification;
(c) posting the program, together with the accompanying
documentation and other files, on electronic bulletin board
systems.
How long is a reasonable period? The idea of shareware is that
you should be able to try a program before deciding to buy it.
Once you have tried PDX2WP and found that it is useful to you you
should begin to realize its benefits. A period of two weeks after
first use should be sufficient to determine the program's
usefulness. Any time after the two weeks is unreasonable.
Use after the reasonable evaluation and testing period requires
payment of a license fee. For a single copy (plus necessary
archival copies), to be used on only one computer at a time, the
fee is $30.00. For your convenience, an invoice form is included
at the end of this documentation. For large quantities, discounts
and site licenses are available. Write for information.
PDX2WP is licensed, and the documentation and other included
files are provided "AS IS," without any warranty as to perfor-
mance, accuracy, or freedom from error, or as to any results
generated through use of such material, including, without
limitation, any implied warranties of merchantability or fitness
for a particular purpose.
Sidekick is a registered trademark of Borland International
Paradox is a trademark of Borland International
WordPerfect is a registered trademark of WordPerfect Corporation
S.L.S. Systems
13 Shirley Ave.
Kingston, Massachusetts 02364
617-585-3620
PDX2WP Page 1
What Is PDX2WP?
PDX2WP is actually a pair of utilities, PDX2WP and WP2PDX, along
with sample Paradox scripts, which will perform translation of
Paradox tables into WordPerfect documents or WordPerfect
secondary merge documents into Paradox tables. PDX2WP will also
work with Address Book files created by Borland's Sidekick 2.0,
which are stored in Paradox tables. The documents created by
PDX2WP are meant for use with WordPerfect version 5.0 or later,
while the documents converted by WP2PDX must already exist as
WordPerfect version 5.0 or later secondary merge documents.
It is important to note that neither PDX2WP nor WP2PDX require
the presence of either Paradox or WordPerfect. All that is
required to run PDX2WP is an existing Paradox table which will be
translated, while WP2PDX only requires an existing WordPerfect
secondary merge document. It must also be noted that neither
PDX2WP nor WP2PDX affect or alter the original Paradox table or
WordPerfect document in any manner.
The WordPerfect document which is created by PDX2WP may be any of
four formats:
-- A WordPerfect table, with rows and columns, similar in
appearance to a spreadsheet. In this format, each Paradox
record becomes a row in the WordPerfect table, with each
column representing a field of the record (up to the
WordPerfect limit of 32 columns). The maximum number of
rows in a WordPerfect table is 32,765. WordPerfect
tables may be used only with versions 5.1 or later of
WordPerfect.
-- WordPerfect parallel columns, where blocks of text are
separated into columns which are printed side-by-side.
With PDX2WP each field of the Paradox record is entered
into a column, with as many columns as there are fields
in the Paradox table (up to the WordPerfect limit of 24
columns).
-- WordPerfect secondary merge file with WordPerfect Version
5.0 merge codes (^R and ^E), where a secondary merge
record is created for each record in the Paradox table.
A merge field is created for each field in the Paradox
record.
-- WordPerfect secondary merge file with WordPerfect Version
5.1 merge codes ({END FIELD} and {END RECORD}) and Field
Names, where a secondary merge record is created for each
PDX2WP Page 2
record in the Paradox table. A merge field is created
for each field in the Paradox record.
The WordPerfect document to be converted by WP2PDX must be a
secondary merge document, created by WordPerfect version 5.0 or
later. It must be a document set up with individual records,
separated by WordPerfect "end of record" merge codes (either ^E
or {END RECORD}). Each record must be broken into fields, each
separated by WordPerfect "end of field" codes (either ^R or {END
FIELD}).
This version of PDX2WP and WP2PDX are command-line oriented
programs. This means that there are no menus, windows, data
entry forms, or other user interface. All options to the
programs are specified as parameters to the programs when run
from the DOS command line.
Installing PDX2WP
As mentioned earlier, PDX2WP is actually two utilities. Each of
these utilities is a self-contained executable program file,
PDX2WP.EXE and WP2PDX.EXE. Simply insert the distribution disk
into your floppy disk drive and copy these two programs from the
distribution disk to a directory which is included in your DOS
path. For example, if you have a directory named \UTILITY in
which you keep all utilities, copy the two program files into the
\UTILITY directory using the DOS "copy" command, as follows:
copy a:*.exe c:\utility
Included with the two executable programs are the following
files:
PDX2WP.DOC This documentation file.
PDX2WP.SC A Paradox script which can be used to execute
PDX2WP from within interactive Paradox.
INIT.SC A Paradox startup script which, when placed
in the Paradox startup directory (i.e.,
\PARADOX3) will assign the PDX2WP.SC script
to the Shift-F5 key. This file should be
modified to direct Paradox to the directory
to which PDX2WP.SC was copied.
CONTACTS.DB A sample Paradox table for use as an example
for PDX2WP.
MAILLIST.DOC A sample WordPerfect
secondary merge
document for use as
PDX2WP Page 3
an example for
WP2PDX.
Copy the above files to appropriate directories, and both PDX2WP
and WP2PDX will be ready to run, from either the DOS command line
or from within Paradox.
How to Use the PDX2WP Utility
PDX2WP may be run from either the DOS command line or from within
a Paradox PAL script. By creating a short PAL script and
attaching the script to a key combination in Paradox using the
SETKEY command, the program may also be run from interactive
Paradox. (Although WordPerfect provides the capability to run a
DOS command, there is not enough memory available to run PDX2WP
while WordPerfect is running.)
Running the PDX2WP Utility From the DOS Command Line
When running PDX2WP from the DOS command line, you must
specify the name of the WordPerfect document you wish to
create, the name of the Paradox table you wish to translate,
and a "switch" specifying which type of WordPerfect document
you wish to create.
The syntax for PDX2WP is:
PDX2WP document-name table-name /type
"Document-name" is the name of the WordPerfect document you
wish to create. You may include a drive specifier, a full
path name, and a file name. The file name follows standard
DOS naming conventions: a name of up to 8 characters, fol-
lowed by an optional period and an extension of up to 3
characters. The following are all valid names for a
WordPerfect document:
MY-FILE2
PDX-TABL2.DOC
B:NAMES
C:\WP\DOCUMENT\MAILLIST.WP
"Table-name" is the name of the Paradox table which will be
translated. This name may be the name of any valid Paradox
table. As with the document-name, you may include a drive
specifier and a full path name. An extension of "DB" is
PDX2WP Page 4
assumed. Therefore, do not include an extension. If an
extension is included, an error message will be displayed.
"Type" represents the type of translation you wish to
perform, and is always preceded by a "/". Valid types and
there meaning are:
T Create a WordPerfect Table (Version 5.1 only)
C Create parallel columns (Version 5.0 or
later)
M Create a secondary merge file (Version 5.0
merge codes ^R and ^E)
MF Create a secondary merge file (Version 5.1
merge codes {END FIELD} and {END RECORD},
with {FIELD NAMES})
The following are examples of valid command-line entries for
the PDX2WP utility:
PDX2WP CONTACTS.WP CONTACTS /M
PDX2WP \ACCOUNT.TBL \PARADOX\FILES\ACCOUNT /T
PDX2WP A:PARTS PARTLIST /C
PDX2WP ADDRBOOK \SK\ADDRESS\ADDRESS /MF
After typing the appropriate command-line entry and pressing
ENTER, several lines of copyright information are displayed.
After the copyright lines is a line which displays the
progress of the conversion process, showing the record number
of each Paradox record as it is translated. Upon completion,
a message indicating the total number of records translated
is displayed. This number indicates the number of rows in
the WordPerfect table or column structure, or the number of
merge records created in a secondary merge file.
Running the PDX2WP Utility From a Paradox PAL Script
By using the PDX2WP utility within a PAL script, the
translation of a Paradox table can be made to execute
automatically, without user intervention. PDX2WP can be run
within a PAL script using the PAL command "RUN BIG" followed
by the command-line entry for PDX2WP described in the
previous section.
A common application of this use would be to translate a
Paradox ANSWER table which is created as a result of a query.
This allows for the translation of a selected subset of
PDX2WP Page 5
records from a Paradox table. Following is an excerpt of a
simple PAL script performing such a query. The line numbers
are shown for information only, and are not part of the
script
1 query
2
3 contacts |Name |Address |City |
4 |check |check |check |
5 | | | |
6 | | | |
7
8
9 contacts |State |Zip Code |
10 |check, MA |check |
11 | | |
12 | | |
13
14 endquery
15
16 Do_It!
17
18 If Istable("Answer") then
19 run big "pdx2wp contacts.wp answer /mf"
20 endif
In this example, the first portion of PAL code, from line 1
to line 14, is a script which was generated using the Paradox
QuerySave command. The script queries the Paradox table
"Contacts," requesting the fields Name, Address, City, State,
and Zip Code, where State is equal to "MA." By editing the
script with the Paradox Script/Edit command and adding lines
15 through 20, the script can be made to perform both the
query and the PDX2WP translation of the resulting Answer
file.
The "Do_It!" command on line 16 causes Paradox to perform the
query specified on lines 1 through 14. If there are any
records which satisfy the criteria in the query command, the
Answer table will be created with those selected records and
will become the current table. Otherwise, no Answer table
will be created and the current table will still be the
Contacts table. Line 18 checks to see if the current table
is the Answer table. If so, then line 19 is executed, which
actually runs PDX2WP as if it were entered at the DOS command
line. When PDX2WP completes the translation, control will
return to the PAL script, and any further commands will be
executed.
PDX2WP Page 6
Running the PDX2WP Utility From Interactive Paradox
There are two methods of running PDX2WP from the interactive
Paradox environment. It may be run as a "mini-script" using
the same statement shown on line 20 of the above script, or
it can be attached to a Paradox "hot-key" with the SETKEY
command.
To execute PDX2WP as a mini-script, access the PAL menu by
pressing Alt-F10. Choose the MiniScript option from the
menu. A message prompting for a command will be displayed.
Type in the command using the RUN BIG command, as in the
example on line 20 of the script above. Be sure to substi-
tute the appropriate document-name, table-name and transla-
tion type in the command, then press Enter to execute PDX2WP.
The second method for running PDX2WP from the interactive
Paradox environment is by assigning the PDX2WP command to a
key combination. This is done by using the Paradox SETKEY
command in a special PAL script named "Init."
The Init script resides in the default data directory for
Paradox, and includes any number of functions to be performed
automatically when Paradox is first loaded. By including a
SETKEY command for PDX2WP in the Init script, the PDX2WP
utility may be executed simply by performing the keystroke to
which the program was assigned. The following line assigns
the PDX2WP command to the Shift-F5 key combination:
setkey "F15" run big "pdx2wp " + table() + " " + table()
+ " /t"
This example again uses the RUN BIG command, as well as the
TABLE() function, which returns the name of the current
Paradox table, to create a WordPerfect file with the same
name as the Paradox table.
Although this is a simple example, it does not allow the
flexibility of choosing which type of translation to perform
once Paradox is running. By using a combination of the
SETKEY command in the Init script and a separate script which
performs the translation, the choice can be made at the time
the key combination is pressed. Rather than having the
assigned key combination do the actual translation, a
separate script may be played by the assigned key combina-
tion. The SETKEY statement in the Init script would then
look more like the following:
setkey "F15" play "\\paradox3\\pdx2wp"
PDX2WP Page 7
The section of the line in quotes after the PLAY command is
the directory and file name of the script to be played.
(When specifying a path or directory in a script, the
subdirectory names must be separated by 2 backwards slashes.)
A complete sample PDX2WP script is included with this
package, and may be used as is or as an example which may be
expanded upon. The sample script first verifies that a table
image is on the Paradox workspace. If there is no image on
the workspace, a message is displayed and processing stops,
returning to the previous state. If there is an image on the
workspace, a Paradox menu is displayed. The menu allows the
selection of the translation type which PDX2WP will perform.
Once an option is chosen, the appropriate translation is per-
formed. The WordPerfect document is given a file name which
is the same as the Paradox table name, and an extension of
.COL, .MRG, or .TBL for a parallel columns document,
secondary merge document, or WordPerfect table, respectively.
By copying the sample script to your Paradox directory and
adding the SETKEY statement to the existing Init script (or
creating an Init script which includes the SETKEY statement),
the PDX2WP translation utility will be continuously available
from within the interactive Paradox environment.
Using PDX2WP with Sidekick 2.0
Beginning with Sidekick Version 2.0 from Borland, Sidekick
Address Book files are stored in Paradox tables. As such,
they may be accessed and converted by PDX2WP the same as any
other Paradox table. By default, Sidekick stores records for
the address books in the Paradox table "ADDRESS." This table
is in the ADDRESS subdirectory of the Sidekick directory.
For example, if Sidekick was installed in C:\SK, the address
books would be in the C:\SK\ADDRESS directory.
The list of fields and their sizes (in characters) for
Address Book files is as follows:
FIELD NAME SIZE
Last Name 20
First Name 20
Middle Name 20
Code 10
Title 35
Company 50
Street 50
City 20
PDX2WP Page 8
State 15
Zip 10
Home Phone 30
Business Phone 30
Alternate Phone 30
Notes 255
How to Use the WP2PDX Utility
WP2PDX may also be run from the DOS command line or from Paradox,
either within the interactive environment or from a PAL script.
While the operation of WP2PDX from the DOS command line is very
similar to that of PDX2WP, the use of WP2PDX from within Paradox
is somewhat different. Again, as with PDX2WP, there generally is
not enough memory available to run WP2PDX from WordPerfect's "Go
To Dos" or "Dos Command" options.
Running the WP2PDX Utility From the DOS Command Line
When running WP2PDX from the DOS command line, you must
specify the name of the WordPerfect secondary merge document
you wish to convert and the name of the Paradox table you
wish to create. Since there is only one type of Paradox
table, there are no additional parameters to the WP2PDX
utility.
The syntax for WP2PDX is:
WP2PDX document-name table-name
"Document-name" is the name of the WordPerfect document you
wish to convert. You may include a drive specifier, a full
path name, and a file name. The file name follows standard
DOS naming conventions: a name of up to 8 characters, fol-
lowed by an optional period and an extension of up to 3
characters. The following are all valid names for a
WordPerfect document:
MY-FILE
PDX-TABL.DOC
B:NAMES
C:\WP\DOCUMENT\MAILLIST.WP
"Table-name" is the name of the Paradox table which will be
created. This name may be any valid Paradox table name. As
with the document-name, you may include a drive specifier and
a full path name. An extension of "DB" is assumed.
PDX2WP Page 9
Therefore, do not include an extension. If an extension is
included, an error message will be displayed.
The following are examples of valid command-line entries for
the WP2PDX utility:
WP2PDX CONTACTS.WP CONTACTS
WP2PDX \ACCOUNTS.MRG \PARADOX\FILES\ACCOUNTS
WP2PDX A:MERGE.NMS NAMES
WP2PDX PARTLIST C:\PARADOX\INVENTORY\PARTS
After typing the appropriate command-line entry and pressing
ENTER, several lines of copyright information are displayed.
WP2PDX then performs the first of three steps: veryifying
that the specified document is a WordPerfect secondary merge
document. This is done by scanning the document for either
"end of field" or "end of record" merge codes. If no such
codes are found, an error message is displayed and the WP2PDX
program terminates.
If the appropriate merge codes are found in the specified
merge document, the next step in the conversion process is
performed. In this step, the document is analyzed to
determine the structure of the individual records in the
merge document. The structure specifies how many fields are
in each record, how long each field is (up to the Paradox
maximum of 255 characters), and what type each field is.
While this analysis is being performed, the following message
is displayed:
Analyzing WordPerfect document. Please wait
followed by a rotating dash or slash character. The rotating
character is displayed as a visual confirmation that the
program is actually working.
After the analysis is complete, the actual conversion step
begins. During the conversion, a line is displayed which
shows the progress of the conversion, showing the record
number of each Paradox record as it is being created. Upon
completion, a message indicating the total number of records
translated is displayed.
PDX2WP Page 10
Limitations of PDX2WP
This version of PDX2WP is a shareware product, and has several
limitations. Though it is a totally functional and useful
program, there are several limitations and default settings which
can not be overridden. Most of these will be addressed in
forthcoming versions of the product.
-- Paradox date fields are translated to the standard
MM/DD/YY format. Future versions will provide the choice
between this format and several others.
-- When translating to a WordPerfect table, number fields
are decimal aligned in the cell, with 2 decimal places.
Future versions will allow selection of numeric formats,
including commas, decimal places, and currency notations.
-- All fields in the Paradox table are translated and placed
into separate columns or fields, and in the same order as
they appear in the Paradox table structure. Future
versions will allow the selection of specific fields in a
user-defined order. It will also allow the joining of
two or more fields together, separated by a carriage re-
turn, a space, or other special characters or codes.
-- When translating to a WordPerfect table, the Paradox
field names are entered into the first row of the
WordPerfect table to serve as headers for the table
structure. This will be an option in future versions.
-- When translating to a parallel columns format, only the
first 24 fields from the Paradox table are converted.
This is a limitation in the number of columns that
WordPerfect allows, rather than a limitation of PDX2WP.
-- When translating to a WordPerfect table, only the first
32 fields and the first 32,765 records are translated.
Again, this is a limitation in the number of columns and
rows that WordPerfect allows, not a limitation of PDX2WP.
-- The limit to the number of fields when translating to a
WordPerfect secondary merge document is 255, which is the
maximum fields allowed in a Paradox table.
-- Since PDX2WP has no knowledge of printer definitions used
in a particular installation of WordPerfect, there is no
printer information included in the created document
files. This restricts these documents from being printed
from the List Files mode of WordPerfect. They must first
PDX2WP Page 11
be retrieved into WordPerfect, so they may be formatted
for the default printer then printed.
-- When translating to either parallel columns or a Word-
Perfect table, the document is created with a portrait
page layout with 1" left and right margins. The columns
are all created the same size, based on the page layout
and margin size. A future version will allow selection
of portrait or landscape mode, as well as user-definable
left, right, top, and bottom margins.
-- Password protected tables are not supported by this
version of PDX2WP. A future version will provide
facilities for accessing protected tables.
-- Access to Paradox tables on a local area network is not
supported by this version of PDX2WP. Again, network
support will be available in a future version of PDX2WP.
Suggestions and Hints
Listed below are some helpful ideas and suggestions for getting
the most from PDX2WP.
-- If you are already using Paradox, you can translate only
the fields you need by using the query-by-example
capabilities of Paradox. When querying, use the F6 key
to check only those fields which you wish to be trans-
lated into WordPerfect. The resulting Answer table will
only include the fields that have been checked with the
F6 key. Then use PDX2WP to translate the Answer table.
-- When creating a WordPerfect table, all columns are set to
equal widths. Once the document has been created, the
column widths may be easily changed using table edit mode
(Alt-F7). All aspects of the table may be changed in
this manner.
-- Similarly, when creating parallel columns, all columns
are set to equal widths. Column widths and margins may
be set using the Column Definition command (Alt-F7).
This is a bit more cumbersome than changing column widths
in a table.
-- It may be useful to change the orientation of the page
from portrait mode to landscape mode by selecting a
different paper size using the Page Format command. This
PDX2WP Page 12
will allow the use of wider columns in both tables and
parallel columns.
-- When creating a WordPerfect table, be aware that there
are considerably more codes required to create a table
than to create parallel columns. Your final document may
be as much as 7 to 10 times larger than the equivalent
Paradox table translated to parallel columns.
-- When creating a WordPerfect secondary merge document, it
may be preferable to use the /MF option, which will not
only use the {END FIELD} and {END RECORD} codes available
in WordPerfect Version 5.1, but will also create the
{FIELD NAMES} section at the beginning of the merge
document. This allows for much easier selection of
fields in a primary merge document. You need only
remember the field names, not the field numbers.
-- When converting a Paradox table with more than 100 fields
to a WordPerfect secondary merge document with the /MF
option, all field names will be inserted into the list of
field names in the document. However, WordPerfect only
keeps track of the first 100 field names in a secondary
merge document. Therefore, in order to place fields
beyond the 100th field into a primary document, the
fields must be referenced by the field number, not the
field name.
Final Comments
As mentioned earlier, this version of PDX2WP is a shareware
product. It is not in the public domain, nor is it "Freeware."
As such, you are expected to register your copy of PDX2WP by
filling out the Invoice/Registration Form which appears at the
end of this document.
As a registered user, you will be made aware of all future
versions of PDX2WP, commercial as well as shareware. If you
decide to upgrade to the commercial version when it becomes
available, your registration fee will be credited toward the
price of the commercial version. You will also be made aware of
other utilities and programs from S. L. S. Systems as they become
available.
Your comments and suggestions regarding PDX2WP are welcome. You
have the opportunity to impact the future of this program, as
well as provide input for the development of other useful
utilities and programs.
PDX2WP Page 13
S. L. S. Systems may be reached through Electronic Mail on
Compuserve (account number 76104,2074) or by mail at the address
on the Invoice/Registration Form.
PDX2WP Page 14
Invoice/Registration Form
Date: ____________
S. L. S. System
13 Shirley Avenue
Kingston, MA 02364
SOLD TO:
Name: ____________________________________
Company: _________________________________
Address: _________________________________
_________________________________
Phone: _________________
FAX: ___________________
What size disks do you use? ___ 5-1/4" ___ 3-1/2"
Where did you hear about PDX2WP? __________________________________
┌───────────────────────────────────────────────┬─────────────────┐
│ Description │ Price │
├───────────────────────────────────────────────┼─────────────────┤
│ License for PDX2WP v. 1.22 │ $ 30.00 │
│ │ │
│ ____ additional licenses @ $30.00 │ _________ │
│ │ │
│ │ │
└───────────────────────────────────────────────┼─────────────────┤
│ │
Total Amount Enclosed │ $ _________ │
└─────────────────┘
Please make checks payable to:
S. L. S. Systems
13 Shirley Avenue
Kingston, MA 02364